package chp05.homework;

import java.util.Scanner;

public class Home5 {
    public static void main(String[] args) {
        System.out.println("欢迎进入青鸟游迷你戏平台");
        System.out.println("请选择你喜爱的的游戏: ");
        while (true) {
            System.out.println("**************************");
            System.out.println("\t\t" + "1.斗地主");
            System.out.println("\t\t" + "2.斗牛");
            System.out.println("\t\t" + "3.泡泡龙");
            System.out.println("\t\t" + "4.连连看");
            System.out.println("**************************");

            Scanner input = new Scanner(System.in);
            System.out.print("请选择, 输入数字: ");
            int num =  input.nextInt();
            if (num == 0) {
                System.out.println("游戏结束");
                break;
            }
            if (num >= 1 && num <= 4) {
                if (num == 1) {
                    System.out.println("您已进入斗地主房间");
                } else if (num == 2) {
                    System.out.println("您已进入斗牛房间!");
                }else if (num == 3) {
                    System.out.println("您已进入泡泡龙房间!");
                }else  {
                    System.out.println("您已进入连连看房间!");
                }
            }else {
                System.out.println("请输入0-4的整数");
            }

        }


    }
}
